package com.greenline.push.dal.pushcenter.impl;

import com.greenline.push.dal.base.BaseDAO;
import com.greenline.push.dal.pushcenter.ClassBatchDefineDAO;
import com.greenline.push.dal.pushcenter.dataobject.ClassBatchDefineDO;
import com.greenline.push.dal.query.ClassBatchDefineQuery;

public class ClassBatchDefineDAOImpl extends BaseDAO implements
		ClassBatchDefineDAO {

	@Override
	public Long insert(ClassBatchDefineDO batchDO) {
		return (Long) super.getSqlMapClientTemplate().insert(
				"classBatchDefine.insert", batchDO);
	}

	@Override
	public ClassBatchDefineDO getClassBatchDefineById(Long id) {
		return (ClassBatchDefineDO) super.getSqlMapClientTemplate()
				.queryForObject("classBatchDefine.find_by_id", id);
	}

	@Override
	public int update(ClassBatchDefineDO batchDO) {
		return super.getSqlMapClientTemplate().update("classBatchDefine.update",
				batchDO);
	}

	@Override
	public ClassBatchDefineQuery listByQuery(ClassBatchDefineQuery query) {
		return (ClassBatchDefineQuery) super.listByQuery(
				"classBatchDefine.list_by_query", query);
	}

	@Override
	public int delete(Long id) {
		return super.getSqlMapClientTemplate().delete(
				"classBatchDefine.delete", id);
	}

}
